package com.bolt.report.engine.model;

import java.io.Serializable;
import java.util.List;

public class DataRange implements Serializable {

    private int start = -1;

    private int end;

    private List<?> bindData;

    public DataRange(int end) {
        this.end = end;
    }

    public DataRange(int start, int end) {
        this.start = start;
        this.end = end;
    }

    public DataRange(int start, int end, List<?> bindData) {
        this.start = start;
        this.end = end;
        this.bindData = bindData;
    }

    public DataRange(List<?> bindData) {
        this.start = -1;
        this.end = -1;
        this.bindData = bindData;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public int getEnd() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    public int offset() {
        return  (end - start) + 1;
    }

    public List<?> getBindData() {
        return bindData;
    }

    public void setBindData(List<?> bindData) {
        this.bindData = bindData;
    }
}
